# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=wi-feye
pkgver=1.1
pkgrel=6
groups=('blackarch' 'blackarch-wireless')
pkgdesc='An automated wireless penetration testing tool written in python, its designed to simplify common attacks that can be performed on wifi networks so that they can be executed quickly and easily.'
arch=('any')
url='http://wi-feye.za1d.com/download.php'
license=('GPL2')
depends=('python2' 'aircrack-ng' 'ettercap' 'hamster' 'python2-scapy'
        'python2-pexpect' 'dsniff' 'driftnet' 'evilgrade' 'python2-colorama')
source=("http://wi-feye.isecur1ty.org/releases/Wi-fEye-v$pkgver.tar.gz")
sha512sums=('542165ae81035afae9c8358acc292ba2537ec729')

package() {
  cd Wi-fEye

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/wi-feye/" README DOCUMENTATION
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm README DOCUMENTATION LICENSE

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python2 Wi-fEye.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

